<template>
  <div class="header">
    <div class="container">
      <div class="logo">
        <img src="../assets/home.png" class="img" @click="handleTo" />
      </div>
      <!-- <div class="title">学生画像</div> -->
    </div>
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()

function handleTo() {
  router.push({
    path: '/',
  })
}
</script>

<style lang="scss" scoped>
.header {
  height: 150px;
  background-color: #1a5798;

  .container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 将内容靠左对齐 */

    .logo {
      width: 100%;
      height: 100%;
      background-image: url('../assets/bgback.jpg');
      /* 设置 Logo 图片的 URL */
      background-size: contain;
      background-repeat: no-repeat;
      background-position: 20% 100%;
    }

    // .title {
    //   font-size: 32px;
    //   color: #fff;
    //   margin-left: 20px;
    // }
  }
}
.logo {
  display: flex;
  justify-content: flex-end;
}
.img {
  height: 60px;
  width: 60px;
  margin: 45px 55px 0 0;
  cursor: pointer;
}
</style>
